using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Design;

namespace OpenComposite.EII
{
	public partial class FormCodeViewer : Form
	{
		public FormCodeViewer()
		{
			InitializeComponent();

			syntaxEditor.SetHighlighting("C#");
			syntaxEditor.Document.ReadOnly = true;
		}

		public string Code
		{
			get { return syntaxEditor.Text; }
			set
			{
				if ( value == null ) value = "";
				syntaxEditor.Text = value;
			}
		}

		public bool ShowErrors
		{
			get { return syntaxEditor.ShowInvalidLines; }
			set { syntaxEditor.ShowInvalidLines = value; }
		}

		public bool ShowLineNumbers
		{
			get { return syntaxEditor.ShowLineNumbers; }
			set { syntaxEditor.ShowLineNumbers = value; }
		}
	}
}